<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>

<!-- ========================= -->
<!-- root element: fabBuildAcknowledgement -->
<!-- ========================= -->


<xsl:template match="fabBuildAcknowledgement">

	<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

        <fo:layout-master-set>
            <fo:simple-page-master master-name="simpleA4"
                page-height="11in"
                page-width="8.5in"
                margin-top="5mm"
                margin-bottom="5mm"
                margin-left="17mm"
                margin-right="20mm" >

                <fo:region-before extent="30mm"/>

                <fo:region-after extent="7mm"/>


                <!-- ========================================================  -->
                <!-- Inorder to check whether Assembly Release is cancelled or not -->
                <!-- ========================================================  -->

                <fo:region-body margin-top="30mm" margin-bottom="30mm"/>

            </fo:simple-page-master>
            </fo:layout-master-set>
        <fo:page-sequence master-reference="simpleA4">
            <fo:flow flow-name="xsl-region-body">
                <fo:table table-layout="fixed" width="95%" space-after="0.3cm" border="1pt double black" background-color="#FFFFEE">
                    <fo:table-column/>
                    <fo:table-body>
                        <fo:table-row background-color="#DEE1E2">
                            <fo:table-cell  border="0.5pt double black" hyphenate="true" display-align="center">
                                <fo:block  text-align="center" font-size="9pt" font-weight="bold">
                                    <xsl:value-of select="vendorName"/>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row background-color="#DEE1E2">
                            <fo:table-cell  border="0.5pt double black" hyphenate="true" display-align="center">
                                <fo:block text-align="center" font-size="9pt" font-weight="bold">Fab Request </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row  border="0.5pt double black">
                            <fo:table-cell hyphenate="true" display-align="center" space-before="5mm">
                                <fo:table table-layout="fixed" width="100%" border="0.5pt double black">
                                    <fo:table-column column-width="45mm"/>
                                    <fo:table-column column-width="40mm"/>
                                    <fo:table-column column-width="40mm"/>
                                    <fo:table-column column-width="45mm"/>
                                    <fo:table-body>
                                        <fo:table-row>
                                            <fo:table-cell number-columns-spanned="4">
                                                <fo:block text-align="left" font-size="7pt" font-weight="bold">1.Customer</fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block text-align="left" font-size="7pt">Customer name</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell number-columns-spanned="2">
                                                <fo:block text-align="left" font-size="7pt" font-weight="bold">
                                                    <xsl:value-of select="customerName"/>
                                                </fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell>
                                                <fo:block text-align="left" font-size="7pt">Customer#       :<xsl:value-of select="customerNumber"/></fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block text-align="left" font-size="7pt">Customer contact</fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell number-columns-spanned="2">
                                                <fo:block text-align="left" font-size="7pt">
                                                    <xsl:value-of select="customerContactPerson"/>
                                                </fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell border="0.5pt double black">
                                                <fo:block text-align="left" font-size="7pt">Date YY/DD/MM       <xsl:value-of select="fabDate"/></fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell>
                                                <fo:block text-align="left" font-size="7pt"></fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell number-columns-spanned="2">
                                                <fo:block text-align="left" font-size="7pt" text-decoration="underline">
                                                    <xsl:value-of select="contactPersonEmail"/>
                                                </fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell border="0.5pt double black">
                                                <fo:block text-align="left" font-size="7pt">PO #       <xsl:value-of select="fabPONumber"/></fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell number-columns-spanned="4">
                                                <fo:block text-align="left" font-size="7pt"></fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                            <fo:table-cell number-columns-spanned="3">
                                                <fo:block text-align="left" font-size="7pt"></fo:block>
                                            </fo:table-cell>
                                            <fo:table-cell border="0.5pt double black">
                                                <fo:block text-align="left" font-size="7pt" font-weight="bold">Fab Request # : <xsl:value-of select="fabRequestNo"/></fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                    </fo:table-body>
                                </fo:table>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>
                <fo:table table-layout="fixed" width="95%" space-after="0.3cm" border="1pt double black" background-color="#FFFFEE">
                    <fo:table-column/>
                    <fo:table-column/>
                    <fo:table-column/>
                    <fo:table-column/>
                    <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell number-columns-spanned="4">
                                <fo:block text-align="left" font-size="7pt" font-weight="bold">2.0 Device Descriptor</fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block text-align="left" font-size="7pt"></fo:block>
                            </fo:table-cell>
                            <fo:table-cell border="0.5pt double black top">
                                <fo:block text-align="left" font-size="7pt">Device OPN</fo:block>
                            </fo:table-cell>
                            <fo:table-cell border="0.5pt double black top">
                                <fo:block text-align="left" font-size="7pt">
                                    <xsl:value-of select="partNumber"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block text-align="left" font-size="7pt"></fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>
                <fo:table table-layout="fixed" width="95%" space-after="0.3cm" border="1pt double black" background-color="#FFFFEE">
                    <fo:table-column/>
                    <fo:table-column/>
                    <fo:table-column/>
                    <fo:table-column/>
                    <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block text-align="left" font-size="7pt" font-weight="bold">3.0 Factory</fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block text-align="left" font-size="7pt">Factory</fo:block>
                            </fo:table-cell>
                            <fo:table-cell number-columns-spanned="2">
                                <fo:block text-align="left" font-size="7pt" font-weight="bold">
                                    <xsl:value-of select="vendorNumber"/>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block text-align="left" font-size="7pt" font-weight="bold"></fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block text-align="left" font-size="7pt">Factory contact</fo:block>
                            </fo:table-cell>
                            <fo:table-cell number-columns-spanned="2">
                                <fo:block text-align="left" font-size="7pt" font-weight="bold">
                                    <xsl:value-of select="vendorContactPerson"/>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block text-align="left" font-size="7pt" font-weight="bold"></fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block text-align="left" font-size="7pt">email</fo:block>
                            </fo:table-cell>
                            <fo:table-cell number-columns-spanned="2">
                                <fo:block text-align="left" font-size="7pt" font-weight="bold">
                                    <xsl:value-of select="vendorContactPersonEmail"/>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>
                <fo:table table-layout="fixed" width="95%" space-after="0.3cm" border="1pt double black" background-color="#FFFFEE">
                    <fo:table-column column-width="25mm"/>
                    <fo:table-column column-width="25mm"/>
                    <fo:table-column column-width="25mm"/>
                    <fo:table-column column-width="15mm"/>
                    <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell number-columns-spanned="4">
                                <fo:block text-align="left" font-size="7pt" font-weight="bold">4.0 Wafer Information</fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block text-align="left" font-size="7pt"></fo:block>
                            </fo:table-cell>
                            <fo:table-cell number-columns-spanned="3">
                                <fo:block text-align="left" font-size="7pt" font-weight="bold">NOTE: Please use Fab Lot # for all data logs on Kalos tester</fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block text-align="left" font-size="7pt"></fo:block>
                            </fo:table-cell>
                            <fo:table-cell border="0.5pt double black">
                                <fo:block text-align="left" font-size="7pt" font-weight="bold">Wafer Qty</fo:block>
                            </fo:table-cell>
                            <fo:table-cell border="0.5pt double black">
                                <fo:block text-align="center" font-size="7pt" font-weight="bold">
                                    <xsl:value-of select="waferQty"/>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell border="0.5pt double black">
                                <fo:block text-align="center" font-size="7pt" font-weight="bold">Lot Number</fo:block>
                            </fo:table-cell>
                            <fo:table-cell border="0.5pt double black">
                                <fo:block text-align="center" font-size="7pt" font-weight="bold">Quantity Available</fo:block>
                            </fo:table-cell>
                            <fo:table-cell border="0.5pt double black">
                                <fo:block text-align="center" font-size="7pt" font-weight="bold">Quantity Pulled</fo:block>
                            </fo:table-cell>
                        </fo:table-row>

                        <xsl:for-each select="/fabBuildAcknowledgement/lotDetails/lotData">
                            <fo:table-row>
                                <fo:table-cell border="0.5pt double black">
                                    <fo:block text-align="center" font-size="7pt"><xsl:value-of select="lotNumber"/></fo:block>
                                </fo:table-cell>
                                <fo:table-cell border="0.5pt double black">
                                    <fo:block text-align="center" font-size="7pt"><xsl:value-of select="qtyAvailable"/></fo:block>
                                </fo:table-cell>
                                <fo:table-cell border="0.5pt double black">
                                    <fo:block text-align="center" font-size="7pt"><xsl:value-of select="qtyPulled"/></fo:block>
                                </fo:table-cell>
                            </fo:table-row>
                        </xsl:for-each>
                    </fo:table-body>
                </fo:table>
                <fo:table table-layout="fixed" width="95%" space-after="0.3cm" border="1pt double black" background-color="#FFFFEE">
                    <fo:table-column/>
                    <fo:table-column/>
                    <fo:table-column/>
                    <fo:table-column/>
                    <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell number-columns-spanned="4">
                                <fo:block text-align="left" font-size="7pt" font-weight="bold">5.0 Fab Program Information</fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block text-align="left" font-size="7pt"></fo:block>
                            </fo:table-cell>
                            <fo:table-cell border="0.5pt double black">
                                <fo:block text-align="left" font-size="7pt">Fab Spec</fo:block>
                            </fo:table-cell>
                            <fo:table-cell border="0.5pt double black">
                                <fo:block text-align="center" font-size="7pt">
                                    <xsl:value-of select="fabSpec"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block text-align="left" font-size="7pt"></fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block text-align="left" font-size="7pt"></fo:block>
                            </fo:table-cell>
                            <fo:table-cell border="0.5pt double black">
                                <fo:block text-align="left" font-size="7pt">Fab Program Revision</fo:block>
                            </fo:table-cell>
                            <fo:table-cell border="0.5pt double black">
                                <fo:block text-align="center" font-size="7pt">
                                    <xsl:value-of select="fabPrgRevision"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block text-align="left" font-size="7pt"></fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell number-columns-spanned="4">
                                <fo:block text-align="left" font-size="7pt"> <fo:inline word-spacing="6pt"></fo:inline></fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>
                <fo:table table-layout="fixed" width="95%" space-after="0.3cm" border="1pt double black" background-color="#FFFFEE">
                    <fo:table-column/>
                    <fo:table-column/>
                    <fo:table-column/>
                    <fo:table-column/>
                    <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell number-columns-spanned="4">
                                <fo:block text-align="left" font-size="7pt" font-weight="bold">6.0 Shipping Requirements</fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell number-columns-spanned="4">
                                <fo:block text-align="left" font-size="7pt">
                                    <xsl:value-of select="shippingRequirements"/>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>
                <fo:table table-layout="fixed" width="95%" space-after="0.3cm" border="1pt double black" background-color="#FFFFEE">
                    <fo:table-column/>
                    <fo:table-column/>
                    <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell number-columns-spanned="2">
                                <fo:block text-align="left" font-size="7pt" font-weight="bold">7.0 Special Instructions.</fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell number-columns-spanned="2">
                                <fo:block text-align="left" font-size="7pt"> <fo:inline word-spacing="6pt"></fo:inline></fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell number-columns-spanned="2">
                                <fo:block text-align="left" font-size="7pt"> <xsl:value-of select="comments"/><fo:inline word-spacing="6pt"></fo:inline></fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                    </fo:table-body>
                </fo:table>
            </fo:flow>
        </fo:page-sequence>
    </fo:root>
</xsl:template>
</xsl:stylesheet>



